﻿//回到顶部
function putgotop() {
    var viewP = ($(window).width() - 990) / 2;
    if (viewP > 20) {
        var topObj = $("<div id=\"gotop\" style=\"display:none;z-index:9000;\"><a href=\"" + window.location.href + "#\"><img alt=\"top\" src=\"../../Content/images/top.jpg\"></a></div>");
        var viewH = $(window).height();
        if (window.XMLHttpRequest) {
            topObj.css({ "position": "fixed", "bottom": 40, "right": viewP - 25 });
        } else {
            topObj.css({ "position": "absolute", "top": $(window).scrollTop() + viewH - 20, "right": viewP - 25 });
        }
        $("body").prepend(topObj);
        $(window).scroll(function () {
            if ($(this).scrollTop() == 0) {
                $("#gotop").fadeOut();

            } else {
                $("#gotop").fadeIn();
                if (!window.XMLHttpRequest) { topObj.css({ "top": $(window).scrollTop() + viewH - 1000 }); }
            }
        });
    }
}
//end
$(document).ready(function () {

    $(".jqzoom").jqueryzoom({
        xzoom: 400,
        yzoom: 400,
        offset: 10,
        position: "right",
        preload: 1,
        lens: 1
    });
    $(".spec-list img").bind("mouseover",
				function () {
				    var src = $(this).attr("src");
				    var name = $(this).attr("name");
				    $(".spec-n1 img").eq(0).attr({
				        src: name.replace("\/n5\/", "\/n1\/"),
				        longdesc: name.replace("\/n5\/", "\/n0\/")
				    });
				    $(this).css({
				        "border": "2px solid #D50043",
				        "padding": "1px"
				    });
				}).bind("mouseout",
				function () {
				    $(this).css({
				        "border": "1px solid #ccc",
				        "padding": "2px"
				    });
				});

    //$(".Countdown").Countdown();
    putgotop();
    //changePrice();
    //fixpng();
    /*try { onload_leftTime(); }
    catch (e) {}*/

});

